\hypertarget{class_utils}{\section{Utils类 参考}
\label{class_utils}\index{Utils@{Utils}}
}


工具类  




{\ttfamily \#include $<$Utils.\+h$>$}

\subsection*{静态 Public 成员函数}
\begin{DoxyCompactItemize}
\item 
static sint32 \hyperlink{class_utils_a10702828999dc39a4076b097f61b0046}{random} (sint32 max)
\begin{DoxyCompactList}\small\item\em 生成一个随机数 \end{DoxyCompactList}\item 
static bool \hyperlink{class_utils_a5f7497f1f2cfcd14353711df1a4df6d9}{is\+Big\+Endian} (void)
\begin{DoxyCompactList}\small\item\em 判断主机是大端还是小端字节序 \end{DoxyCompactList}\item 
static uint16 \hyperlink{class_utils_ac24e02b86c0d0633bf06049be63a1a3a}{host2\+Lit\+Endian} (uint16 value)
\begin{DoxyCompactList}\small\item\em 将数字转换成小端字节序 \end{DoxyCompactList}\item 
static uint32 \hyperlink{class_utils_ad34748eeb0095fc77a4fc45ddaa73b12}{host2\+Lit\+Endian} (uint32 value)
\begin{DoxyCompactList}\small\item\em 将数字转换成小端字节序 \end{DoxyCompactList}\item 
static uint16 \hyperlink{class_utils_a6686f66b3fc90b7b7b3f082b98d85f9d}{host2\+Big\+Endian} (uint16 value)
\begin{DoxyCompactList}\small\item\em 将数字转换成大端字节序 \end{DoxyCompactList}\item 
static uint32 \hyperlink{class_utils_a348631871c43eb7d9cbd2453f90da373}{host2\+Big\+Endian} (uint32 value)
\begin{DoxyCompactList}\small\item\em 将数字转换成大端字节序 \end{DoxyCompactList}\item 
static string \hyperlink{class_utils_ad51d3336750b0453623b0e513db3ef6e}{unicode\+One\+To\+Utf8\+String} (uint32 unicode)
\begin{DoxyCompactList}\small\item\em unicode编码转换为utf8编码的字符串 \end{DoxyCompactList}\item 
static uint32 \hyperlink{class_utils_a7b4b5ca72dbe0af5a472e36c7cc37a27}{utf8\+One\+To\+Unicode} (const char $\ast$utf8code)
\begin{DoxyCompactList}\small\item\em utf8编码转换为unicode编码的字符串 \end{DoxyCompactList}\item 
static string \hyperlink{class_utils_a3983b2a151262d06dfef4e7f0b9689d2}{find\+String} (const string \&source, const string \&start, const string \&end)
\begin{DoxyCompactList}\small\item\em 查找start开始与end结束的字符串 \end{DoxyCompactList}\item 
static string \hyperlink{class_utils_ac7aa2d138cfad5b8bc66a9911f8c45e1}{find\+String} (const string \&source, const string \&pattern, const string \&before, const string \&after)
\begin{DoxyCompactList}\small\item\em 查找匹配字段 \end{DoxyCompactList}\item 
static string \hyperlink{class_utils_afc5f03d5f6c8d87a2d4d9340d942de32}{trim\+Begin\+With} (const string \&source, const string \&trimch)
\begin{DoxyCompactList}\small\item\em 从字符串头部去除trimch包含的字符,直至遇到非trimch字符为止 \end{DoxyCompactList}\item 
static string \hyperlink{class_utils_a2715e8eab11063806810ae7c16cb388a}{trim\+Ending\+Blank} (const string \&source)
\begin{DoxyCompactList}\small\item\em 去除字符串首尾两端的不可见字符 \end{DoxyCompactList}\item 
static string \hyperlink{class_utils_a4306306ce96eabe0ba24600277b0a138}{trim\+All\+Blank} (const string \&source)
\begin{DoxyCompactList}\small\item\em 去除字符串中所有不可见字符 \end{DoxyCompactList}\item 
static vector$<$ string $>$ \hyperlink{class_utils_ae6e078d5b8b8521b9f97756bb68986c6}{cut\+String} (const string \&source, const string \&start\+Flag, const string \&stop\+Flag, const string \&cut\+Flag)
\begin{DoxyCompactList}\small\item\em 分割字符串 \end{DoxyCompactList}\item 
static sint32 \hyperlink{class_utils_a691ec4b7f5042369933173d4a0491312}{string\+Pattern\+Count} (const string \&source, const string \&pattern)
\begin{DoxyCompactList}\small\item\em 获取匹配次数 \end{DoxyCompactList}\item 
static sint8 \hyperlink{class_utils_a8e240650bfb615f8e33007f9098a1049}{ascii2digital} (char ch)
\begin{DoxyCompactList}\small\item\em A\+S\+C\+I\+I码转换为数字 \end{DoxyCompactList}\item 
static char \hyperlink{class_utils_ae35e73ebd15f0497c3e1963932c0e605}{digital2ascii} (uint8 val)
\begin{DoxyCompactList}\small\item\em 数字转换为\+A\+S\+C\+I\+I码 \end{DoxyCompactList}\item 
static sint32 \hyperlink{class_utils_a5c158c6bcc283c1fe8169e83b9bf9f12}{string2code} (const string codestr, uint8 $\ast$codebuf, sint32 len)
\begin{DoxyCompactList}\small\item\em 字符串转为编码 \end{DoxyCompactList}\item 
static string \hyperlink{class_utils_a9a5be5ae3aa534220fff48613d1b2388}{code2string} (const uint8 $\ast$codebuf, sint32 len)
\begin{DoxyCompactList}\small\item\em 编码转为字符串 \end{DoxyCompactList}\item 
\hypertarget{class_utils_ac1e63a558c84b5f61c65680b54da1b52}{static uint16 {\bfseries bits\+Reverse} (uint16 value, uint8 bits)}\label{class_utils_ac1e63a558c84b5f61c65680b54da1b52}

\item 
static int \hyperlink{class_utils_a67a0e2fb412eea002ca924317649f07e}{eval} (const char $\ast$expression)
\begin{DoxyCompactList}\small\item\em 算术计算函数 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
工具类 

\subsection{成员函数说明}
\hypertarget{class_utils_a8e240650bfb615f8e33007f9098a1049}{\index{Utils@{Utils}!ascii2digital@{ascii2digital}}
\index{ascii2digital@{ascii2digital}!Utils@{Utils}}
\subsubsection[{ascii2digital}]{\setlength{\rightskip}{0pt plus 5cm}sint8 Utils\+::ascii2digital (
\begin{DoxyParamCaption}
\item[{char}]{ch}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a8e240650bfb615f8e33007f9098a1049}


A\+S\+C\+I\+I码转换为数字 


\begin{DoxyParams}{参数}
{\em ch} & A\+S\+C\+I\+I码字符 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
ch对应的数字 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
字符'0'$\sim$'9'转换后为数字0$\sim$9,'a'$\sim$'f'或'A'$\sim$'F'转换后为10$\sim$16,其余返回值为-\/1 
\end{DoxyNote}
\hypertarget{class_utils_a9a5be5ae3aa534220fff48613d1b2388}{\index{Utils@{Utils}!code2string@{code2string}}
\index{code2string@{code2string}!Utils@{Utils}}
\subsubsection[{code2string}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string Utils\+::code2string (
\begin{DoxyParamCaption}
\item[{const uint8 $\ast$}]{codebuf, }
\item[{sint32}]{len}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a9a5be5ae3aa534220fff48613d1b2388}


编码转为字符串 


\begin{DoxyParams}{参数}
{\em codebuf} & 待转换的编码缓存 \\
\hline
{\em len} & 缓存大小 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回转换后的字符串,失败返回空字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
\mbox{[}0x00\mbox{]}\mbox{[}0x41\mbox{]}\mbox{[}0x00\mbox{]}\mbox{[}0x1\+F\mbox{]}==$>$\char`\"{}0041001\+F\char`\"{} 
\end{DoxyNote}
\hypertarget{class_utils_ae6e078d5b8b8521b9f97756bb68986c6}{\index{Utils@{Utils}!cut\+String@{cut\+String}}
\index{cut\+String@{cut\+String}!Utils@{Utils}}
\subsubsection[{cut\+String}]{\setlength{\rightskip}{0pt plus 5cm}vector$<$ string $>$ Utils\+::cut\+String (
\begin{DoxyParamCaption}
\item[{const string \&}]{source, }
\item[{const string \&}]{start\+Flag, }
\item[{const string \&}]{end\+Flag, }
\item[{const string \&}]{cut\+Flag}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_ae6e078d5b8b8521b9f97756bb68986c6}


分割字符串 


\begin{DoxyParams}{参数}
{\em source} & 源字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回分割后的字串数组 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
分割从start\+Flag后到end\+Flag之前的字串,分割符为cut\+Flag 
\end{DoxyNote}
\hypertarget{class_utils_ae35e73ebd15f0497c3e1963932c0e605}{\index{Utils@{Utils}!digital2ascii@{digital2ascii}}
\index{digital2ascii@{digital2ascii}!Utils@{Utils}}
\subsubsection[{digital2ascii}]{\setlength{\rightskip}{0pt plus 5cm}char Utils\+::digital2ascii (
\begin{DoxyParamCaption}
\item[{uint8}]{val}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_ae35e73ebd15f0497c3e1963932c0e605}


数字转换为\+A\+S\+C\+I\+I码 


\begin{DoxyParams}{参数}
{\em val} & 数字 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
数字对应的\+A\+S\+C\+I\+I码字符 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
数字0$\sim$9转成字符'0'$\sim$'9',数字10$\sim$16转成'A'$\sim$'F',其余返回值为0,为字符串结束符 
\end{DoxyNote}
\hypertarget{class_utils_a67a0e2fb412eea002ca924317649f07e}{\index{Utils@{Utils}!eval@{eval}}
\index{eval@{eval}!Utils@{Utils}}
\subsubsection[{eval}]{\setlength{\rightskip}{0pt plus 5cm}int Utils\+::eval (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{expression}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a67a0e2fb412eea002ca924317649f07e}


算术计算函数 


\begin{DoxyParams}{参数}
{\em expression} & 算术表达式,支持整数的加减乘除及括号 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回计算结果 
\end{DoxyReturn}
\begin{DoxyNote}{注解}

\end{DoxyNote}
\hypertarget{class_utils_a3983b2a151262d06dfef4e7f0b9689d2}{\index{Utils@{Utils}!find\+String@{find\+String}}
\index{find\+String@{find\+String}!Utils@{Utils}}
\subsubsection[{find\+String}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string Utils\+::find\+String (
\begin{DoxyParamCaption}
\item[{const string \&}]{source, }
\item[{const string \&}]{start, }
\item[{const string \&}]{end}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a3983b2a151262d06dfef4e7f0b9689d2}


查找start开始与end结束的字符串 


\begin{DoxyParams}{参数}
{\em source} & 源字串 \\
\hline
{\em start} & 开始字串 \\
\hline
{\em end} & 结束字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回找到的字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_ac7aa2d138cfad5b8bc66a9911f8c45e1}{\index{Utils@{Utils}!find\+String@{find\+String}}
\index{find\+String@{find\+String}!Utils@{Utils}}
\subsubsection[{find\+String}]{\setlength{\rightskip}{0pt plus 5cm}string Utils\+::find\+String (
\begin{DoxyParamCaption}
\item[{const string \&}]{source, }
\item[{const string \&}]{pattern, }
\item[{const string \&}]{before, }
\item[{const string \&}]{after}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_ac7aa2d138cfad5b8bc66a9911f8c45e1}


查找匹配字段 


\begin{DoxyParams}{参数}
{\em source} & 源字串 \\
\hline
{\em pattern} & 匹配字串 \\
\hline
{\em before} & 匹配字串之前的字串 \\
\hline
{\em after} & 匹配字串之后的字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回找到的字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_a6686f66b3fc90b7b7b3f082b98d85f9d}{\index{Utils@{Utils}!host2\+Big\+Endian@{host2\+Big\+Endian}}
\index{host2\+Big\+Endian@{host2\+Big\+Endian}!Utils@{Utils}}
\subsubsection[{host2\+Big\+Endian}]{\setlength{\rightskip}{0pt plus 5cm}uint16 Utils\+::host2\+Big\+Endian (
\begin{DoxyParamCaption}
\item[{uint16}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a6686f66b3fc90b7b7b3f082b98d85f9d}


将数字转换成大端字节序 


\begin{DoxyParams}{参数}
{\em value} & 16位宽的数字 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回转换后的数字 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_a348631871c43eb7d9cbd2453f90da373}{\index{Utils@{Utils}!host2\+Big\+Endian@{host2\+Big\+Endian}}
\index{host2\+Big\+Endian@{host2\+Big\+Endian}!Utils@{Utils}}
\subsubsection[{host2\+Big\+Endian}]{\setlength{\rightskip}{0pt plus 5cm}uint32 Utils\+::host2\+Big\+Endian (
\begin{DoxyParamCaption}
\item[{uint32}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a348631871c43eb7d9cbd2453f90da373}


将数字转换成大端字节序 


\begin{DoxyParams}{参数}
{\em value} & 32位宽的数字 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回转换后的数字 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_ac24e02b86c0d0633bf06049be63a1a3a}{\index{Utils@{Utils}!host2\+Lit\+Endian@{host2\+Lit\+Endian}}
\index{host2\+Lit\+Endian@{host2\+Lit\+Endian}!Utils@{Utils}}
\subsubsection[{host2\+Lit\+Endian}]{\setlength{\rightskip}{0pt plus 5cm}uint16 Utils\+::host2\+Lit\+Endian (
\begin{DoxyParamCaption}
\item[{uint16}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_ac24e02b86c0d0633bf06049be63a1a3a}


将数字转换成小端字节序 


\begin{DoxyParams}{参数}
{\em value} & 16位宽的数字 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回转换后的数字 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_ad34748eeb0095fc77a4fc45ddaa73b12}{\index{Utils@{Utils}!host2\+Lit\+Endian@{host2\+Lit\+Endian}}
\index{host2\+Lit\+Endian@{host2\+Lit\+Endian}!Utils@{Utils}}
\subsubsection[{host2\+Lit\+Endian}]{\setlength{\rightskip}{0pt plus 5cm}uint32 Utils\+::host2\+Lit\+Endian (
\begin{DoxyParamCaption}
\item[{uint32}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_ad34748eeb0095fc77a4fc45ddaa73b12}


将数字转换成小端字节序 


\begin{DoxyParams}{参数}
{\em value} & 32位宽的数字 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回转换后的数字 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_a5f7497f1f2cfcd14353711df1a4df6d9}{\index{Utils@{Utils}!is\+Big\+Endian@{is\+Big\+Endian}}
\index{is\+Big\+Endian@{is\+Big\+Endian}!Utils@{Utils}}
\subsubsection[{is\+Big\+Endian}]{\setlength{\rightskip}{0pt plus 5cm}bool Utils\+::is\+Big\+Endian (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a5f7497f1f2cfcd14353711df1a4df6d9}


判断主机是大端还是小端字节序 


\begin{DoxyParams}{参数}
{\em void} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
大端字节序返回true,小端字节序返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
小端模式是数字的低位在低地址,大端模式是高位在低地址 0x1234 ---数值 \mbox{[}0x34\mbox{]}\mbox{[}0x12\mbox{]}---小端模式中内存存储(计算机逻辑,低地址放低位) \mbox{[}0x12\mbox{]}\mbox{[}0x34\mbox{]}---大端模式中内存存储(更符合人类思维习惯) 
\end{DoxyNote}
\hypertarget{class_utils_a10702828999dc39a4076b097f61b0046}{\index{Utils@{Utils}!random@{random}}
\index{random@{random}!Utils@{Utils}}
\subsubsection[{random}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Utils\+::random (
\begin{DoxyParamCaption}
\item[{sint32}]{max}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a10702828999dc39a4076b097f61b0046}


生成一个随机数 


\begin{DoxyParams}{参数}
{\em max} & 最大取值 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回随机数 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
生成一个0$\sim$max之间的随机数 
\end{DoxyNote}
\hypertarget{class_utils_a5c158c6bcc283c1fe8169e83b9bf9f12}{\index{Utils@{Utils}!string2code@{string2code}}
\index{string2code@{string2code}!Utils@{Utils}}
\subsubsection[{string2code}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Utils\+::string2code (
\begin{DoxyParamCaption}
\item[{const string}]{codestr, }
\item[{uint8 $\ast$}]{codebuf, }
\item[{sint32}]{len}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a5c158c6bcc283c1fe8169e83b9bf9f12}


字符串转为编码 


\begin{DoxyParams}{参数}
{\em codestr} & 待转换字符创 \\
\hline
{\em codebuf} & 转换好的编码缓存 \\
\hline
{\em len} & 缓存大小 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回code的长度,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
\char`\"{}0041001\+F\char`\"{} ==$>$\mbox{[}0x00\mbox{]}\mbox{[}0x41\mbox{]}\mbox{[}0x00\mbox{]}\mbox{[}0x1\+F\mbox{]} 
\end{DoxyNote}
\hypertarget{class_utils_a691ec4b7f5042369933173d4a0491312}{\index{Utils@{Utils}!string\+Pattern\+Count@{string\+Pattern\+Count}}
\index{string\+Pattern\+Count@{string\+Pattern\+Count}!Utils@{Utils}}
\subsubsection[{string\+Pattern\+Count}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Utils\+::string\+Pattern\+Count (
\begin{DoxyParamCaption}
\item[{const string \&}]{source, }
\item[{const string \&}]{pattern}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a691ec4b7f5042369933173d4a0491312}


获取匹配次数 


\begin{DoxyParams}{参数}
{\em source} & 源字串 \\
\hline
{\em pattern} & 匹配字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回匹配次数 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_a4306306ce96eabe0ba24600277b0a138}{\index{Utils@{Utils}!trim\+All\+Blank@{trim\+All\+Blank}}
\index{trim\+All\+Blank@{trim\+All\+Blank}!Utils@{Utils}}
\subsubsection[{trim\+All\+Blank}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string Utils\+::trim\+All\+Blank (
\begin{DoxyParamCaption}
\item[{const string \&}]{source}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a4306306ce96eabe0ba24600277b0a138}


去除字符串中所有不可见字符 


\begin{DoxyParams}{参数}
{\em source} & 源字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回trim后得到的字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_afc5f03d5f6c8d87a2d4d9340d942de32}{\index{Utils@{Utils}!trim\+Begin\+With@{trim\+Begin\+With}}
\index{trim\+Begin\+With@{trim\+Begin\+With}!Utils@{Utils}}
\subsubsection[{trim\+Begin\+With}]{\setlength{\rightskip}{0pt plus 5cm}string Utils\+::trim\+Begin\+With (
\begin{DoxyParamCaption}
\item[{const string \&}]{source, }
\item[{const string \&}]{trimch}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_afc5f03d5f6c8d87a2d4d9340d942de32}


从字符串头部去除trimch包含的字符,直至遇到非trimch字符为止 


\begin{DoxyParams}{参数}
{\em source} & 源字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回trim后得到的字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
例\+:result = trim\+Begin\+With(\char`\"{} 0001234\char`\"{},\char`\"{}0 \char`\"{});//result=\char`\"{}1234\char`\"{} 
\end{DoxyNote}
\hypertarget{class_utils_a2715e8eab11063806810ae7c16cb388a}{\index{Utils@{Utils}!trim\+Ending\+Blank@{trim\+Ending\+Blank}}
\index{trim\+Ending\+Blank@{trim\+Ending\+Blank}!Utils@{Utils}}
\subsubsection[{trim\+Ending\+Blank}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string Utils\+::trim\+Ending\+Blank (
\begin{DoxyParamCaption}
\item[{const string \&}]{source}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a2715e8eab11063806810ae7c16cb388a}


去除字符串首尾两端的不可见字符 


\begin{DoxyParams}{参数}
{\em source} & 源字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回trim后得到的字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_ad51d3336750b0453623b0e513db3ef6e}{\index{Utils@{Utils}!unicode\+One\+To\+Utf8\+String@{unicode\+One\+To\+Utf8\+String}}
\index{unicode\+One\+To\+Utf8\+String@{unicode\+One\+To\+Utf8\+String}!Utils@{Utils}}
\subsubsection[{unicode\+One\+To\+Utf8\+String}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string Utils\+::unicode\+One\+To\+Utf8\+String (
\begin{DoxyParamCaption}
\item[{uint32}]{unicode}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_ad51d3336750b0453623b0e513db3ef6e}


unicode编码转换为utf8编码的字符串 


\begin{DoxyParams}{参数}
{\em unicode} & 字符编码 \\
\hline
{\em utfcode} & 转换后的\+U\+T\+F8编码缓冲区(最少6字节) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回转换后的字符,转换失败时返回空字符 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_utils_a7b4b5ca72dbe0af5a472e36c7cc37a27}{\index{Utils@{Utils}!utf8\+One\+To\+Unicode@{utf8\+One\+To\+Unicode}}
\index{utf8\+One\+To\+Unicode@{utf8\+One\+To\+Unicode}!Utils@{Utils}}
\subsubsection[{utf8\+One\+To\+Unicode}]{\setlength{\rightskip}{0pt plus 5cm}uint32 Utils\+::utf8\+One\+To\+Unicode (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{utf8code}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_utils_a7b4b5ca72dbe0af5a472e36c7cc37a27}


utf8编码转换为unicode编码的字符串 


\begin{DoxyParams}{参数}
{\em utfcode} & U\+T\+F8编码(1$\sim$6字节) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回unicode编码,失败返回0 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_utils_8h}{Utils.\+h}\item 
libemb/src/Utils.\+cpp\end{DoxyCompactItemize}
